package util;

public class Pair<T1, T2> {
	T1 o1;
	T2 o2;
	
	public Pair(T1 o1_, T2 o2_) {
		o1 = o1_;
		o2 = o2_;
	}
	
	public T1 getLeft() {
		return o1;
	}
	
	public T2 getRight() {
		return o2;
	}
	
	@Override
	public int hashCode() {
		return o1.hashCode() + o2.hashCode();
	}
	
	@Override
	public boolean equals(Object other) {
		Pair<T1, T2> o = (Pair<T1, T2>) other; 
		return o1.equals(o.o1) && o2.equals(o.o2);
	}
	
	@Override
	public String toString() {
		return o1.toString() + " " + o2.toString();
	}
}
